<?php
/**
 * @file test004.php
 * @package taobaoke
 * @subpackage 
 * @version $id: 0.1 UTF-8 2009-7-5 下午04:38:45 $
 * @author LD King (mifunny.info)
 * @copyright Copyright (c) 2007 - 2009 MiFunny China Inc. (http://mifunny.info)
 * 获得店铺推广URL
 */

/*
淘宝客店铺	TaobaokeShop	http://wiki.open.taobao.com/index.php/TaobaokeShop
字段名	类型	字段说明
user_id	String	店铺用户id
shop_title	String	店铺名称
click_url	String	店铺推广URL
shop_commission.rate	String	淘宝客店铺佣金比率
 */
header("Content-Type:text/html;charset=UTF-8");
require_once '../config.inc.php';

//API系统参数
$topParamArr = array(
	'api_key' => APP_KEY,
	'method' => 'taobao.taobaoke.shops.convert',
	'format' => PARAM_FORMAT,
	'v' => PARAM_VERSION,
	'timestamp' => date('Y-m-d H:i:s')

);

//API用户参数
$userParamArr = array(
	'fields' => 'user_id,shop_title,click_url,shop_commission.rate',
	'sids' => '44518469',
	'outerCode' => 'blog',
	'nick' => 'alipublic02'  //["sid"]=>  string(8) "44518469"
);

$paramArr = $topParamArr + $userParamArr;

$result = Util::postResult($paramArr);
$result = Util::getXmlData($result);

var_dump($result);

?>